diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 002090d..744295f 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -36,7 +36,7 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('site_url'))
 {
 	function site_url($uri = '')
@@ -55,7 +55,7 @@
  *
  * @access	public
  * @return	string
- */	
+ */
 if ( ! function_exists('base_url'))
 {
 	function base_url()
@@ -75,7 +75,7 @@
  *
  * @access	public
  * @return	string
- */	
+ */
 if ( ! function_exists('current_url'))
 {
 	function current_url()
@@ -89,11 +89,11 @@
 /**
  * URL String
  *
- * Returns the URI segments.  
+ * Returns the URI segments.
  *
  * @access	public
  * @return	string
- */	
+ */
 if ( ! function_exists('uri_string'))
 {
 	function uri_string()
@@ -112,7 +112,7 @@
  *
  * @access	public
  * @return	string
- */	
+ */
 if ( ! function_exists('index_page'))
 {
 	function index_page()
@@ -121,7 +121,7 @@
 		return $CI->config->item('index_page');
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -134,13 +134,13 @@
  * @param	string	the link title
  * @param	mixed	any attributes
  * @return	string
- */	
+ */
 if ( ! function_exists('anchor'))
 {
 	function anchor($uri = '', $title = '', $attributes = '')
 	{
 		$title = (string) $title;
-	
+
 		if ( ! is_array($uri))
 		{
 			$site_url = ( ! preg_match('!^\w+://! i', $uri)) ? site_url($uri) : $uri;
@@ -149,7 +149,7 @@
 		{
 			$site_url = site_url($uri);
 		}
-	
+
 		if ($title == '')
 		{
 			$title = $site_url;
@@ -163,7 +163,7 @@
 		return '<a href="'.$site_url.'"'.$attributes.'>'.$title.'</a>';
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -181,35 +181,41 @@
 if ( ! function_exists('anchor_popup'))
 {
 	function anchor_popup($uri = '', $title = '', $attributes = FALSE)
-	{	
+	{
 		$title = (string) $title;
-	
+
 		$site_url = ( ! preg_match('!^\w+://! i', $uri)) ? site_url($uri) : $uri;
-	
+
 		if ($title == '')
 		{
 			$title = $site_url;
 		}
-	
+
 		if ($attributes === FALSE)
 		{
 			return "<a href='javascript:void(0);' onclick=\"window.open('".$site_url."', '_blank');\">".$title."</a>";
 		}
-	
+
 		if ( ! is_array($attributes))
 		{
 			$attributes = array();
 		}
-		
+
 		foreach (array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0', ) as $key => $val)
 		{
 			$atts[$key] = ( ! isset($attributes[$key])) ? $val : $attributes[$key];
+			unset($attributes[$key]);
 		}
 
-		return "<a href='javascript:void(0);' onclick=\"window.open('".$site_url."', '_blank', '"._parse_attributes($atts, TRUE)."');\">".$title."</a>";
+		if ($attributes != '')
+		{
+			$attributes = _parse_attributes($attributes);
+		}
+
+		return "<a href='javascript:void(0);' onclick=\"window.open('".$site_url."', '_blank', '"._parse_attributes($atts, TRUE)."');\"$attributes>".$title."</a>";
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -226,18 +232,18 @@
 	function mailto($email, $title = '', $attributes = '')
 	{
 		$title = (string) $title;
-	
+
 		if ($title == "")
 		{
 			$title = $email;
 		}
-	
+
 		$attributes = _parse_attributes($attributes);
-	
+
 		return '<a href="mailto:'.$email.'"'.$attributes.'>'.$title.'</a>';
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -256,17 +262,17 @@
 	function safe_mailto($email, $title = '', $attributes = '')
 	{
 		$title = (string) $title;
-	
+
 		if ($title == "")
 		{
 			$title = $email;
 		}
-					
+
 		for ($i = 0; $i < 16; $i++)
 		{
 			$x[] = substr('<a href="mailto:', $i, 1);
 		}
-	
+
 		for ($i = 0; $i < strlen($email); $i++)
 		{
 			$x[] = "|".ord(substr($email, $i, 1));
@@ -289,21 +295,21 @@
 				}
 			}
 			else
-			{	
+			{
 				for ($i = 0; $i < strlen($attributes); $i++)
 				{
 					$x[] = substr($attributes, $i, 1);
 				}
 			}
-		}	
-	
+		}
+
 		$x[] = '>';
-	
+
 		$temp = array();
 		for ($i = 0; $i < strlen($title); $i++)
 		{
 			$ordinal = ord($title[$i]);
-	
+
 			if ($ordinal < 128)
 			{
 				$x[] = "|".$ordinal;
@@ -314,7 +320,7 @@
 				{
 					$count = ($ordinal < 224) ? 2 : 3;
 				}
-		
+	
 				$temp[] = $ordinal;
 				if (count($temp) == $count)
 				{
@@ -325,12 +331,12 @@
 				}
 			}
 		}
-	
+
 		$x[] = '<'; $x[] = '/'; $x[] = 'a'; $x[] = '>';
-	
+
 		$x = array_reverse($x);
 		ob_start();
-	
+
 	?><script type="text/javascript">
 	//<![CDATA[
 	var l=new Array();
@@ -349,7 +355,7 @@
 		return $buffer;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -371,11 +377,11 @@
 	function auto_link($str, $type = 'both', $popup = FALSE)
 	{
 		if ($type != 'email')
-		{		
+		{
 			if (preg_match_all("#(^|\s|\()((http(s?)://)|(www\.))(\w+[^\s\)\<]+)#i", $str, $matches))
 			{
 				$pop = ($popup == TRUE) ? " target=\"_blank\" " : "";
-		
+	
 				for ($i = 0; $i < sizeof($matches['0']); $i++)
 				{
 					$period = '';
@@ -384,7 +390,7 @@
 						$period = '.';
 						$matches['6'][$i] = substr($matches['6'][$i], 0, -1);
 					}
-			
+		
 					$str = str_replace($matches['0'][$i],
 										$matches['1'][$i].'<a href="http'.
 										$matches['4'][$i].'://'.
@@ -399,7 +405,7 @@
 		}
 
 		if ($type != 'url')
-		{	
+		{
 			if (preg_match_all("/([a-zA-Z0-9_\.\-\+Å]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z0-9\-\.]*)/i", $str, $matches))
 			{
 				for ($i = 0; $i < sizeof($matches['0']); $i++)
@@ -410,16 +416,16 @@
 						$period = '.';
 						$matches['3'][$i] = substr($matches['3'][$i], 0, -1);
 					}
-			
+		
 					$str = str_replace($matches['0'][$i], safe_mailto($matches['1'][$i].'@'.$matches['2'][$i].'.'.$matches['3'][$i]).$period, $str);
 				}
-		
 			}
 		}
+
 		return $str;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -439,16 +445,16 @@
 		{
 			return '';
 		}
-	
+
 		if (substr($str, 0, 7) != 'http://' && substr($str, 0, 8) != 'https://')
 		{
 			$str = 'http://'.$str;
 		}
-	
+
 		return $str;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -477,7 +483,7 @@
 			$search		= '-';
 			$replace	= '_';
 		}
-		
+
 		$trans = array(
 						'&\#\d+?;'				=> '',
 						'&\S+?;'				=> '',
@@ -489,16 +495,16 @@
 					  );
 
 		$str = strip_tags($str);
-	
+
 		foreach ($trans as $key => $val)
 		{
 			$str = preg_replace("#".$key."#i", $val, $str);
 		}
-	
+
 		return trim(stripslashes($str));
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -527,7 +533,7 @@
 		exit;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -561,12 +567,12 @@
 				$att .= ' ' . $key . '="' . $val . '"';
 			}
 		}
-	
+
 		if ($javascript == TRUE AND $att != '')
 		{
 			$att = substr($att, 0, -1);
 		}
-	
+
 		return $att;
 	}
 }
